fn rem(int dividend, int divisor):int! {
	if divisor == 0 {
		throw errorf('divisor cannot zero')
	}

	return dividend % divisor
}

int result = 0

fn main():void! {
    // normal
    result = rem(10, 3)
    println(result)

    // normal
    result = rem(10, 4) catch err {
        println(err.msg())
        0
    }
    println(result)

    // error handle
    result = rem(10, 0) catch err {
        println(err.msg())
        1
    }
    println(result)


    // error not handle
    result = rem(10, 0)
    println('hello world')
}